package com.kish.web;

import com.kish.dao.BrandDao;
import com.kish.domain.User;
import com.kish.factory.StaticFactoryBean;
import com.kish.service.UserService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Demo03 {
    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
        UserService userService = (UserService) context.getBean("userService");
        userService.save(new User());

        BrandDao bd1 = StaticFactoryBean.createBrandDao();
        bd1.add();
    }
}
